//import java.awt.*;
//import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class TugOfWarDummySensor extends TugOfWarSensor implements ChangeListener {

	public TugOfWarDummySensor(RopeState rs) {
		super(rs);	
	}

	public void initialize() {
		JFrame frame = new JFrame("Virtual Tug Of War: Dummy Sensor");
		JSlider sensorSlider = new JSlider(JSlider.HORIZONTAL, 0, 1000, 0);
		frame.getContentPane().add(sensorSlider);
		frame.pack();
		frame.setVisible(true);
		sensorSlider.addChangeListener(this);
	}

	public void stateChanged(ChangeEvent e) {
        JSlider source = (JSlider)e.getSource();
		this.setSensorValue((int)source.getValue());
	}
		
}
